package com.martin.study.others;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public class MainTest {
	public static void main(String[] args) {
		Son child = new Son();
		Type t = child.getClass().getGenericSuperclass();
		if (t instanceof ParameterizedType) {
			System.out.println(t);
			for (Type type : ((ParameterizedType) t).getActualTypeArguments()) {
				System.out.println(type.getClass());
				System.out.println(type.getTypeName());
			}
		}
	}
}